<div class="flashMessages">
    <?php if (isset($this->flashMessages)): ?>
        <?php foreach ($this->flashMessages as $key => $msgs): ?>
            <?php if (count($msgs)): ?>
                <div class="flash-messenger flash-messenger-<?= $key; ?> alert alert-<?= $key; ?>">
                    <a href="javascript:nop();" onclick="javascript:FM.close(this);" class="fm-close"><span class="ui-icon ui-icon-closethick">close</span></a>
                    <div class="flash-messenger-icon">&nbsp;</div>
                    <ul>
                        <?php foreach ($msgs as $msg): ?>
                            <li><?= $msg; ?></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            <?php endif; ?>
        <?php endforeach; ?>
    <?php endif; ?>
</div>